<script setup>
defineProps({
  mClass: {
    type: String,
    default: 'w-full h-40px'
  },
  plain: {
    type: Boolean,
    default: false
  },
  disabled: {
    type: Boolean,
    default: false
  },
  loading: {
    type: Boolean,
    default: false
  }
})
const emit = defineEmits(['click'])
const handleClick = () => emit('click')
</script>

<template>
  <van-button
    :disabled="disabled"
    :class="mClass"
    :plain="plain"
    type="primary"
    @click="handleClick"
    :loading="loading"
  >
    <slot>清空</slot>
  </van-button>
</template>

<style scoped lang="less">
.van-button--primary {
  font-size: 16px;
  line-height: 16px;
  font-weight: 500;
  color: #fff;
  background-color: #36b374;
  border: 1px solid #36b374;
  border-radius: 4px;
}

.van-button--plain.van-button--primary {
  color: #07c160;
}

.van-button--plain {
  background-color: #fff;
}
</style>